Image processing apparatus, image processing method, and storage medium thereof

ABSTRACT

An image processing apparatus, including: an image obtaining means that obtains an image; a color area detecting means that detects a predetermined color area from the image thus obtained by the image obtaining means; an area specifying means that specifies an area to be adjusted based on saturation and brightness of the color area thus detected by the color area detecting means; and a color adjusting means that adjusts at least one of a hue, the saturation and the brightness of a pixel in the process area thus specified by the area specifying means.

This application is based on and claims the benefit of priority fromJapanese Patent Application Nos. 2009-172198 and 2010-120194,respectively filed on 23 Jul. 2009 and 26 May 2010, the contents ofwhich are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing apparatus, an imageprocessing method, and a storage medium thereof.

2. Related Art

For example, Japanese Patent Application No. 2006-121416 discloses atechnique of carrying out a whitening process on a face area in adigital image obtained by capturing an image of a person in order toincrease brightness of a portion to be highlighted.

An image processing method disclosed in Japanese Patent Application No.2006-121416 carries out the whitening process by generating a bokehimage from an original image to be processed and increasing thebrightness of a portion to be highlighted using this bokeh image.

It is often the case that, when capturing a picture of a person,illumination in the room and flash light emission at the time ofphotographing are overlapped with the person's face due to sebum on askin of the face, and unnatural gloss is thus produced in the image thathas been captured. Such unnatural gloss is called as “shine”. Accordingto the image processing method disclosed in Japanese Patent ApplicationNo. 2006-121416, when a shine component is included in a facial image tobe processed, an area of the shine component is expanded by thewhitening process, and therefore it is not possible to reduce the shine.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide an image processingapparatus, an image processing method, and a storage medium havingstored therein an image processing program, capable of reducing a shinecomponent in a face included in an image that has been captured, therebyconverting the captured image to a more favorable image.

In order to attain the aforementioned object, in accordance with anaspect of the present invention, there is provided an image processingapparatus, comprising: an image obtaining means that obtains an image; acolor area detecting means that detects a predetermined color area fromthe image thus obtained by the image obtaining means; an area specifyingmeans that specifies an area to be adjusted based on saturation andbrightness of the color area thus detected by the color area detectingmeans; and a color adjusting means that adjusts at least one of a hue,the saturation and the brightness of a pixel in the area to be adjustedthus specified by the area specifying means.

In order to attain the aforementioned object, in accordance with anotheraspect of the present invention, there is provided an image processingmethod comprising the steps of: an image obtaining step of obtaining animage; a color area detecting step of detecting a predetermined colorarea from the image thus obtained in the image obtaining step; an areaspecifying step of specifying an area to be adjusted based on saturationand brightness of the color area thus detected in the color areadetecting step; and a color adjusting step of adjusting at least one ofa hue, the saturation and the brightness of a pixel in the area to beadjusted thus specified in the area specifying step.

In order to attain the aforementioned object, in accordance with anotheraspect of the present invention, there is provided a storage mediumhaving stored therein an image processing program which causes acomputer provided with an image obtaining means that obtains an image tofunction as: a color area detecting means that detects a predeterminedcolor area from the image thus obtained by the image obtaining means; anarea specifying means that specifies an area to be adjusted based onsaturation and brightness of the color area thus detected by the colorarea detecting means; and a color adjusting means that adjusts at leastone of a hue, the saturation and the brightness of a pixel in the areato be adjusted thus specified by the area specifying means.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a circuit configuration of a digital camerathat functions as an embodiment of an image processing apparatusaccording to the present invention;

FIG. 2 is a schematic diagram for illustrating an RGB color space;

FIG. 3 is a schematic diagram for illustrating an HSV color space;

FIG. 4 is a flow chart showing a sequence of a shine suppressing processaccording to a first embodiment, the shine suppressing processsuppressing shine by reducing shine components in image data that hasbeen captured by the digital camera shown in FIG. 1;

FIG. 5 is a schematic diagram illustrating a circular area along whichvalues of the hue H in the HSV color space are distributed;

FIG. 6 is a partial sectional view of the HSV color space shown in FIG.3;

FIG. 7 is a flowchart showing a sequence of a shine suppressing processaccording to a second embodiment, the shine suppressing processsuppressing shine by reducing shine components in image data that hasbeen captured by the digital camera shown in FIG. 1;

FIG. 8 is a set of diagrams illustrating one example of a method ofcalculating a personal target value of the shine suppressing processaccording to the second embodiment shown in FIG. 7, respectivelyillustrating a partial top view and a partial sectional view of an HSVspace in which pixels in a flesh color obtaining area are plotted;

FIG. 9 is a set of diagrams illustrating one example of the method ofcalculating a personal target value of the shine suppressing processaccording to the second embodiment shown in FIG. 7, respectivelyillustrating partial top views of the HSV space;

FIG. 10 is a flowchart showing a sequence of the shine suppressingprocess according to a third embodiment, the shine suppressing processsuppressing shine by reducing the shine component in the image data thathas been captured by the digital camera shown in FIG. 1; and

FIG. 11 is a flowchart showing detailed sequence of a shine suppressionmethod selecting process of the shine suppressing process according tothe third embodiment shown in FIG. 10.

BRIEF DESCRIPTION OF THE DRAWING

Preferred embodiments of the present invention are describedhereinafter.

[First Embodiment]

FIG. 1 is a block diagram of a circuit configuration of a digital camerathat functions as a first embodiment of an image processing apparatusaccording to the present invention.

The present embodiment of a digital camera 1 includes, as basicoperating modes, a capturing mode for capturing still images or movingimages and a playback mode for playing the captured images. Thecapturing mode includes a normal mode, a scene mode, and a movie mode.Among these, the scene mode includes, as sub-modes, such as a personcapturing mode, a landscape capturing mode, and a nightscape capturingmode. The person capturing mode is a capturing mode suitable forcapturing an image of a person.

As shown in FIG. 1, the digital camera 1 is provided with aphotographing lens 2, an image capturing unit 3, a preprocessing unit 4,a processing information storing unit 5, program memory 6, an imageprocessing unit 7, a control unit 8, an image storing unit 9, a displayunit 10, a key input unit 11, and a light emitting unit 12.

The photographing lens 2 is an optical lens for producing an opticalimage on the image capturing unit 3 from incident light of aphotographic subject, and is configured by a focus lens, a zoom lens, orthe like.

The image capturing unit 3 is configured as an image sensor such as aCMOS (Complementary Metal Oxide Semiconductor) sensor, and is positionedon an optical axis of the photographing lens 2. The image capturing unit3 receives image light that has been converged through the photographinglens 2, and photoelectrically converts an optical image of thephotographic subject produced on a light receiving surface into analogimage capturing signals. The photographing lens 2 and the imagecapturing unit 3 together serve as an image obtaining means in thepresent invention.

The preprocessing unit 4 controls CDS (correlated double sampling) withwhich analog image capturing signals corresponding to the optical imageof the photographic subject outputted from the image capturing unit 3are inputted and the inputted image capturing signals are retained, ananalog/digital converter (ADC) for amplifying the image capturingsignals and converting the amplified image capturing signals intodigital image data, etc. The image capturing signals outputted from theimage capturing unit 3 are forwarded through the preprocessing unit 4 tothe image storing unit 9 in the form of digital image data. The processof the preprocessing unit 4 is executed in accordance with a commandfrom the control unit 8.

The processing information storing unit 5 stores data as processinginformation that is used for adjusting the image data. In the firstembodiment, the processing information storing unit 5 is at leastprovided with a white component gain table storing unit 5 a and a shinecomponent gain table storing unit 5 b.

The white component gain table storing unit 5 a stores a table ofsaturation gain values used for determining a degree of whiteness forrespective pixels specified as a flesh color area that will be describedlater. Similarly, the shine component gain table storing unit 5 b storestables of saturation gain values and brightness gain values used fordetermining a degree of shininess for the respective pixels specified asthe flesh color area.

The program memory 6 stores programs respectively corresponding tovarious processes that are executed by the image processing unit 7, thecontrol unit 8, or the like.

The image processing unit 7 carries out various processes relating toimage processing as will be described later. The image processing unit 7serves as each of a color area detecting means, an area specifyingmeans, a color adjusting means, a face detecting means, an area settingmeans, and intensity calculating means in the present invention.

Furthermore, the image processing unit 7 carries out a process ofalternately converting an image that has been taken from RGB color spacesignals to HSV color space signals and vice versa. An RGB color spacerefers to a color space that is constituted by three components of red(R), green (G), and blue (B). Moreover, an HSV color space refers to acolor space expressed by the HSV model and constituted by threecomponents of hue (H), saturation (or chroma) (S), and brightness (orlightness value) (V). The HSV color space will be described later.

Referring back to FIG. 1, the control unit 8 is a central processingunit (CPU), for example, and controls the digital camera 1 as a wholeaccording to the programs stored in the program memory 6. The controlunit 8 also controls processing unit such as the preprocessing unit 4and the image processing unit 7. The control unit 8 also specifies acapturing mode in accordance with an operation of a capturing modesetting key 11 b, which will be described later, and sets imagecapturing conditions of the image capturing unit 3 in accordance withthe capturing mode thus specified. The control unit 8 serves as asetting means and a photographing condition setting means.

The image storing unit 9 stores the image data that has been captured bythe image capturing unit 3 and preprocessed by the preprocessing unit 4.When playing the image, the control unit 8 reads the image data from theimage storing unit 9 and causes the display unit 10 to display the imagedata.

The display unit 10 is a color TFT (Thin Film Transistor) liquidcrystal, an STN (Super Twisted Nematic) liquid crystal, or the like, forexample, and displays a preview image, the image obtained after thephotographing, a setting menu according to the control by the controlunit 8, and the like.

The key input unit 11 inputs an instruction from a user. The key inputunit 11 is provided with a shutter key 11 a and a capturing mode settingkey 11 b. The shutter key 11 a is an input unit for inputting aninstruction from the user for starting to capture an image. Thecapturing mode setting key 11 b is an input unit for inputting aninstruction from the user of setting a desired operating mode.

The light emitting unit 12 is a light emitting device for irradiatingflash lighting to the photographic subject. Since a shine component canbe easily produced in an image of a person's face captured byirradiating flash lighting, a process of shine removal as describedlater is carried out on the image that is captured along with the flashlighting in the present embodiment.

Next, the RGB color space and the HSV color space are described. FIG. 2is a schematic diagram for illustrating the RGB color space, and FIG. 3is a schematic diagram for illustrating the HSV color space.

As shown in FIG. 2, the image data processed by the preprocessing unit 4is expressed by the color space that is constituted by three componentsof red (R), green (G), and blue (B). The image processing unit 7according to the present embodiment is provided with a function ofcarrying out color space conversion of the image data from the RGB colorspace to the HSV color space.

The HSV color space can be expressed by a circular cone C, as shown inFIG. 3. The HSV color space expressed by the circular cone C expressesthe hue H along a circular area that is a base of the circular cone C.The hue H represents types of color such as red, blue, and yellow, andis expressed by an intensity distribution within a range of 0-359degrees.

The saturation S is expressed by a distance from a center of thecircular area as the base of the circular cone C in a radial direction(radius). The saturation S is vividness of the color, and is expressedby a value within a range of 0-255 with the center of the circular areaas 0. In the HSV color space, grayness becomes more prominent and thesaturation S is more expressed by a dull color as the value of thesaturation S decreases.

The brightness V is expressed by a distance from a tip of the circularcone C in a direction toward the base. The brightness V is lightness ofthe color, and is expressed by a value within a range of 0-255, with thetip of the cone as 0. In the HSV color space, the brightness V isexpressed by a darker color as the value of the brightness V decreases.

Now, a sequence of a process of reducing a shine component (hereinafterreferred to as “shine suppressing process”) in image data captured withthe present embodiment of the digital camera 1 is described withreference to a flowchart shown in FIG. 4. The following process iscarried out by the control unit 8 shown in FIG. 1 controlling each unit.Furthermore, the process of this flowchart starts when the userinstructs to start to store a captured image by operating the shutterkey 11 a after operating the capturing mode setting key 11 b to set anyof the capturing modes.

First, in Step S1, the image processing unit 7 obtains image dataprocessed by the preprocessing unit 4 from the image storing unit 9.Here, since it takes time to process if the pixel size is large, it ispossible to create reduced scale image data by reducing the scale of theimage data stored in the image storing unit 9, and to carry out thefollowing process on this reduced scale image data.

In Step S2, the image processing unit 7 determines whether or not theobtained image data has been captured along with flash lighting of thelight emitting unit 12. Here, the determination on whether or not theimage has been captured along with the flash lighting can be made by thecontrol unit 8 based on, for example, whether or not the light emittingunit 12 has irradiated flash lighting, or by referring to photographinginformation added to the image data. If the result of the determinationin Step S2 is YES, the process proceeds to Step S3. In Step S3, theimage processing unit 7 carries out a face detection process on theimage data. Since the face detection process is a known technique, itwill not be described in detail.

In Step S4, the image processing unit 7 determines whether or not a facearea is detected in an image. If the result of the determination in StepS4 is YES, in Step S5, the image processing unit 7 carries out colorspace conversion of the image data of the face area from the RGB colorspace to the HSV color space. In Step S6, the image processing unit 7obtains the hue H from the image in the HSV color space, and specifies aflesh color area having a color corresponding to the flesh color of theperson.

FIG. 5 is a schematic diagram illustrating the circular area along whichvalues of the hue H in the HSV color space are distributed. The fleshcolor area having a color corresponding to the flesh color of the personis approximately constituted by a group of pixels having values of thehue H that are distributed within a range shown by oblique lines withinthe figure. The image processing unit 7 specifies the pixels within thisrange in the image in the HSV color space as the flesh color area.

In Step S7, the image processing unit 7 specifies an area of pixelswhere the saturation S is no greater than a predetermined value and thebrightness V is no less than a predetermined value as an area to beadjusted (process area) out of the flesh color area. The process area isan area that is specified as a shine component within the flesh colorarea. Subsequently, in Step S8, the image processing unit 7 calculatesthe intensity of the shine component in the process area.

Here, a process for determining degrees of the whiteness and theshininess for each pixel in the process area is carried out. In thewhiteness degree determination, the saturation gain value stored in thewhite component gain table storing unit 5 a is compared with thesaturation of a pixel, which is a subject of the determination. As thesaturation of a white component is extremely low, it is possible tocalculate a degree of the whiteness of a pixel by comparing thesaturation of the pixel with the saturation gain value. Furthermore, inthe shininess degree determination, the saturation gain value and thebrightness gain value stored in the shine component gain table storingunit 5 b are compared with the values of the saturation and thebrightness of the pixel, which is the subject of the determination.Since the saturation of the shine component is low but the brightness ishigh, it is possible to calculate a degree of the shininess of a pixelby comparing the saturation gain value and the brightness gain valuewith the saturation and the brightness values of the pixel. The imageprocessing unit 7 calculates the intensity of the shine component (shineintensity) for each the pixel, which is the subject of the determinationbased on the degrees of the whiteness and the shininess.

In Step S9, the image processing unit 7 adjusts the saturation S and thebrightness V of each pixel in the process area based on the intensity ofthe shine component. FIG. 6 is a partial sectional view of the HSV colorspace shown in FIG. 3. The pixel A, which is one of the pixels that arespecified in Step S7 as constituting the process area, is located at aposition where the saturation S is low and the brightness V is high asindicated in FIG. 6. Therefore, in Step S9, the color is adjusted so asto come closer to the flesh color by increasing the saturation S anddecreasing the brightness V of all the pixels that constitute theprocess area based on the intensity of the shine component. Here, sinceonly decreasing the brightness V results in a grey color, it is possibleto make the color closer to the original flesh color by increasing thesaturation S at the same time.

By adjusting the saturation and the brightness as described above, thepixel A in the process area shown in FIG. 6 is adjusted so as to move toa position indicated by the dashed line from a position indicated by thesolid line in the figure. With this process, it is possible to reducethe shine component in the flesh color area, thereby making the color ofthe flesh color area in the image closer to the original flesh color.

In Step S10, the image processing unit 7 carries out color spaceconversion of the image data of the face area including the process areain which the shine component has been reduced from the HSV color spaceto the RGB color space.

As described above, through a series of processes from Steps S5 to S10in the shine suppressing process shown in FIG. 4 according to the firstembodiment, the process area is adjusted so that the saturation Sincreases and the brightness V decreases to reduce the shine componentin the process area, thereby suppressing the shine as a result.Accordingly, the series of processes from Steps S5 to S10 is hereinafterreferred to as a “first process”.

When the “first process” ends in S10, the process proceeds to Step S11.

In Step S11, the image processing unit 7 stores the processed image datain the image storing unit 9.

Alternately, if the result of the determination in Step S2 or in Step S4is NO, the process proceeds to Step S12. In Step S12, the imageprocessing unit 7 stores (overwrites) the image data that has beencaptured in the image storing unit 9 in an unaltered state. After StepS11 or Step S12, the image processing unit 7 and the control unit 8terminate the process of this flowchart.

The first embodiment of the digital camera 1 provides the followingadvantageous effects.

(1) The process area as the shine component in the person's face in theimage data that has been captured is specified, and the saturation andthe brightness of the process area are adjusted. Therefore, it ispossible to reduce the shine component included in the image data and toconvert a facial image area of the person into a more favorable image.

(2) With the function of face detection, the face area is detected fromthe image data, and the flesh color area is specified from the facearea. Therefore, it is possible to increase the processing speed.

(3) In the flesh color area, pixels having saturation no greater than apredetermined value and having brightness no less than the predeterminedvalue is specified as the process area that is the shine component.Therefore, it is possible to effectively determine the pixels of theshine component.

(4) The shine suppressing process for reducing the shine component iscarried out when the image data has been captured along with the flashlighting. Therefore, it is possible to carry out the shine suppressingprocess for reducing the shine component effectively on the image datathat has been captured under a condition in which the shine componentcan be easily produced.

(5) The intensity of the saturation and the brightness in the processarea is calculated, and the saturation and the brightness of each pixelin the process area are adjusted based on the calculated intensity ofthe saturation and the brightness. Therefore, it is possible to moreaccurately adjust the saturation and the brightness of each pixel in theprocess area.

[Second Embodiment]

A second embodiment is different from the first embodiment in that, inplace of the first process, a second process is executed during theshine suppressing process on the photographic subject.

The digital camera 1 shown in FIG. 1 also functions as the secondembodiment of the image processing apparatus. Accordingly, thedescription of the circuit configuration thereof is similar to the firstembodiment, and thus not described herein. However, the processinginformation storing unit 5 of the second embodiment is not provided withthe white component gain table storing unit 5 a and the shine componentgain table storing unit 5 b, and stores various information used in theshine suppressing process of FIG. 7, which will be described later.

Next, the sequence of the shine suppressing process executed by thepresent embodiment of the digital camera 1 is described with referenceto the flowchart shown in FIG. 7.

The following process is carried out by the control unit 8 shown in FIG.1 controlling each unit. Furthermore, the process of this flowchartstarts when the user instructs to start to store a captured image byoperating the shutter key 11 a after operating the capturing modesetting key 11 b to set any of the capturing modes.

In Step S21, the image processing unit 7 obtains the image dataprocessed by the preprocessing unit 4 from the image storing unit 9.Here, since it takes time to process if a pixel size is large, it ispossible to create reduced scale image data by reducing the scale of theimage data stored in the image storing unit 9, and to carry out thefollowing process on this reduced scale image data.

In Step S22, the image processing unit 7 carries out the face detectionprocess on the image data, thereby attempting to detect the face area inan image represented by the image data. Since the face detection processis a known technique, it will not be described in detail.

In Step S23, the image processing unit 7 determines whether or not theface area is detected in the image.

If the face area is not detected in the image, it is determined to be NOin Step S23, and the process proceeds to Step S33.

In Step S33, the image processing unit 7 stores (overwrites) the imagedata that has been captured in the image storing unit 9 in an unalteredstate. With this, the process of this flowchart ends.

In contrast, if the face area is detected in the image, it is determinedto be YES in Step S23, and the process proceeds to Step S24.

In Step S24, the image processing unit 7 obtains various informationrelating to the face included in the face area based on the result ofthe face detection process in Step S22 (hereinafter, the information isall referred to as the “face information”).

More specifically, for example, information such as a coordinates of aframe enclosing the face area and coordinates of positions of eyes ofthe photographic subject included in the face area (hereinafter referredto as the “eye position information”) is obtained as the faceinformation.

In Step S25, the image processing unit 7 obtains information, whichrelates to a flesh color of the person who is the photographic subject,and is specified by the face information based on the face informationobtained in the process of Step S24 (hereinafter referred to as “skinparameter”).

More specifically, for example, the image processing unit 7 sets apredetermined area around the eyes based on the eye position informationamong the face information as a “flesh color obtaining area”. The “fleshcolor obtaining area” is determined to be an area from which the skinparameter of the person who is the photographic subject can be obtainedreliably.

The area that can be the flesh color obtaining area is an area where theskin of the person who is the photographic subject is certainly present,such as portions under the eyes, or a portion around the nose or thecheek, in general. Accordingly, in order to calculate the flesh colorobtaining area, the eye position information is used here. However, inorder to calculate the flesh color obtaining area, any information, notlimited to the eye position information, can be used as long as theinformation is the face information with which the flesh color obtainingarea can be calculated.

The image processing unit 7 carries out color space conversion of theimage data of the flesh color obtaining area from the RGB color space tothe HSV color space.

Then, the image processing unit 7 obtains information (a) to (c) listedbelow as the skin parameters from the image data of the flesh colorobtaining area in the HSV color space.

It should be noted that, in the information (a) and (b) below, “theperson” refers to the person whose face area has been detected, i.e.,the person with a facial portion included in the flesh color obtainingarea. Furthermore, “(HSV)” indicates that the information is constitutedby values of the hue H, the saturation S, and the brightness V.

(a) Average parameters (HSV values) of the shiny area of the person(hereinafter abbreviated as the “first parameter”).

(b) Average parameters (HSV values) of the skin area of the personwithout the shine (hereinafter abbreviated as the “second parameter”).

(c) Ratio of the shiny area in the flesh color obtaining area.

Specifically, the image processing unit 7 distinguishes between theshiny area and the flesh color area excluding the shiny area in theflesh color obtaining area. Then, the image processing unit 7 calculatesthe average values of the hue H, the saturation S, and the brightness Vof the pixels that constitute the shiny area as the first parameter. Onthe other hand, the image processing unit 7 calculates the averagevalues of the hue H, the saturation S, and the brightness V of thepixels that constitute the flesh color area of the person without theshine as the second parameter. Furthermore, the image processing unit 7calculates a ratio (%) of the shiny area in the flesh color obtainingarea as the ratio of the shiny area in relation to the skin.

In Step S26, the image processing unit 7 calculates the target valuebased on the skin parameters obtained in the process of Step S25.

Here, the “target value” refers to a target value that is used to adjust(correct) so as to approximate the values of the hue H, the saturationS, and the brightness V in each pixel of the process area (hereinafter,these values are integrally referred to as the “HSV values”) to theflesh color of the person who is the photographic subject. The targetvalue is constituted by the HSV values.

For example, the target value is calculated according to the ratio ofthe shiny area based on a difference between the first parameter and thesecond parameter obtained in the process of Step S25.

The various information as described above, i.e., the face informationobtained in the process of Step S24, the skin parameters (here, thefirst parameter, the second parameter, and the ratio of the shiny areato the skin) computed in the process of Step S25, and the target valuecalculated in the process of Step S26 are stored in the processinginformation storing unit 5.

Next, in Step S27, the image processing unit 7 carries out color spaceconversion of the image data of the face area obtained in the process ofStep S24 from the RGB color space to the HSV color space.

In Step S28, the image processing unit 7 obtains the hue H from theimage in the HSV color space, and specifies the flesh color area basedon the hue H.

In Step S29, the image processing unit 7 specifies the process area inthe flesh color area specified by the image processing unit 7 in StepS28.

The process area refers to an area that is specified as a shinecomponent within the flesh color area, as described above in thedescription of Step S7 according to the first embodiment.

Therefore, although the process area can be specified by any method aslong as the shine component can be specified, the same method as in thefirst embodiment is employed in the second embodiment. This means thatan area of pixels where the saturation S is no greater than apredetermined value and the brightness V is no less than a predeterminedvalue is specified as the process area.

In Step S30, the image processing unit 7 corrects the HSV values in theprocess area specified in the process of Step S29 based on the targetvalue calculated in the process of Step S26.

With this, the shine component within the process area is reduced, andit is possible to approximate the color to the flesh color of the personincluded as the photographic subject in the captured image.

In Step S31, the image processing unit 7 carries out color spaceconversion of the image data of the face area including the process areain which the shine component has been reduced from the HSV color spaceto the RGB color space.

As described above, through a series of processes from Steps S26 to S31in the shine suppressing process of FIG. 7 according to the secondembodiment, the flesh color of the person who is the photographicsubject is taken into account, and each of the HSV values of the processarea is adjusted to reduce the shine component in the process area.Thus, the series of processes from Steps S26 to S31 is hereinafterreferred to as a “second process”.

When the second process ends, the process proceeds to Step S32.

In Step S32, the image processing unit 7 stores the processed image datain the image storing unit 9. With this, the process of this flowchartends.

Next, a specific example of the process of Step S26 of FIG. 7, i.e., aspecific example of the process of calculating the target value isdescribed with reference to FIGS. 8A and 8B and FIGS. 9A and 9Baccordingly.

As described above, in the immediately previous Step S25, an area thatcan appropriately include the flesh color of the person who is thephotographic subject out of the face area is calculated as the fleshcolor obtaining area. Then, the flesh color obtaining area is dividedinto the shiny area and the flesh color area, and the first parameter iscalculated from the shiny area, and the second parameter is calculatedfrom the flesh color area.

FIGS. 8A and 8B show the HSV space in which the pixels in the fleshcolor obtaining area are plotted. To be more specific, FIG. 8A shows apartial top view of the HSV space, and FIG. 8B shows a partial sectionalview of the HSV space.

In FIG. 8A, x-marks respectively represent pixels that constitute theshiny area within the flesh color obtaining area. The average values ofthe hue H, the saturation S, and the brightness V for each of thesepixels are calculated as a first parameter 51.

In FIG. 8A, blank circles (except the circles assigned with a numericsymbol 52) respectively represent the pixels that constitute the fleshcolor area within the flesh color obtaining area. The average values ofthe hue H, the saturation S, and the brightness V for each of thesepixels are calculated as a second parameter 52.

As shown in FIG. 8A and FIG. 8B, a target value 53 is represented as acoordinate of a point on a line connecting the first parameter 51 andthe second parameter 52 (the filled circles in the figures), i.e., asthe values of the hue H, the saturation S, and the brightness V of thispoint.

The target value 53 can be computed as described below, for example.

First, the image processing unit 7 calculates differences between theHSV values of the second parameter 52 and the HSV values of the firstparameter 51, respectively.

Next, if absolute values of the calculated differences are large, theimage processing unit 7 is required to set the target value 53 close tothe first parameter 51. In order to carry out the setting in thismanner, it is necessary to provide markers indicating how much thetarget value 53 should be approximated to the first parameter 51. One ofthe markers that indicates a position of the point on the lineconnecting the first parameter 51 and the second parameter 52 in apercentage, with the first parameter 51 as a starting point (0%) and thesecond parameter 52 as an ending point (100%), is hereinafter referredto as a “correction ratio”. Specifically, the correction ratio is amarker that indicates how much the target value 53 is approximated tothe values of the first parameter 51, with a smaller percentage valueindicating a value closer to the first parameter 51.

FIGS. 9A and 9B are exemplary partial top views of the HSV space,illustrating the correction ratio. To be more specific, FIG. 9A showsthe target value 53 when the correction ratio is 15%. On the other hand,FIG. 9B shows the target value 53 when the correction ratio is 50%.Comparing FIG. 9A and FIG. 9B, it can be seen that the target value 53when the correction ratio is 15% as in FIG. 9A is more approximated tothe first parameter 51 than the target value 53 when the correctionratio is 50% as in FIG. 9B is.

Here, the image processing unit 7 sets the correction ratio based onvarious conditions, such as whether or not the image capturing iscarried out along with the flash lighting of the light emitting unit 12,and the difference between the second parameter and the first parameter.

Then, the image processing unit 7 computes the target value 53 based onthe first parameter, the second parameter, and the correction ratio thathas been set.

As described above, a specific example of the process of Step S26 inFIG. 7, i.e., the specific example of the process of calculating thetarget value is described with reference to FIGS. 8A and 8B and FIGS. 9Aand 9B accordingly.

Next, the HSV values of each pixel in the process area are correctedthrough the process of Step S30 in FIG. 7, so as to approximate to thetarget value.

According to the second embodiment of the digital camera 1, in additionto the same effect as provided in the first embodiment, the secondprocess (see Steps S26 to S31 in FIG. 7) in which the flesh color of theperson who is the photographic subject is taken into account isexecuted. Specifically, the color based on the flesh color of the personis set as the target value, and each pixel in the process area isappropriately corrected so as to be approximated to the target value.With this, it is possible to reduce the shine component based on theflesh color of the photographic subject; therefore, the shine in thephotographic subject can be suppressed in a natural manner.

[Third Embodiment]

In a third embodiment of the shine suppressing process, the firstprocess employed in the first embodiment (see Steps S5 to S10 in FIG. 4)and the second process employed in the second embodiment (see Steps S26to S31 in FIG. 7) are selectively executed.

The digital camera 1 shown in FIG. 1 also functions as the thirdembodiment of the image processing apparatus. Accordingly, theexplanation of circuit configuration is similar to the first embodiment,and thus not described here.

In the following, the sequence of the shine suppressing process executedby the third embodiment of the digital camera 1 is described withreference to a flowchart shown in FIG. 10.

The following process is carried out by the control unit 8 shown in FIG.1 controlling each unit. Furthermore, the process of this flowchartstarts when the user operates the capturing mode setting key 11 b to setany of the capturing modes. Alternatively, the process starts when theshutter key 11 a is pressed halfway.

In Step S41, the control unit 8 executes image capturing and live viewdisplay.

The control unit 8 sequentially reads the image data of each frame imagetemporarily stored in the processing information storing unit 5 or thelike during the image capturing with live view, and sequentiallydisplays a corresponding frame image in the display unit 10. The seriesof processes here is referred to as “live view display”. The frame imagedisplayed in the display unit 10 in such a live view display ishereinafter referred to as a “live view image”.

It should be noted that the image capturing and the live view displaycan be naturally executed in the cases of the first embodiment and thesecond embodiment of the digital camera 1 as well. Specifically, theflowcharts shown in FIG. 4 and FIG. 7 illustrate the processes after thestart of storing the image that has been captured is instructed bypressing (fully pressing) the shutter key 11 a, as described above, andthus illustration of the steps of carrying out the image capturing andthe live view display are simply omitted.

In Step S42, the image processing unit 7 carries out the face detectionprocess on the image data of a live view image, thereby attempting todetect the face area in the live view image. Since the face detectionprocess is a known technique, it will not be described in detail.

After a result of the face detection process is stored in the processinginformation storing unit 5, the process proceeds to Step S43.

In Step S43, the control unit 8 determines whether or not the shutterkey 11 a is pressed (fully pressed).

If the user has not fully pressed down the shutter key 11 a, it isdetermined to be NO in Step S43, and the process returns to Step S41.Specifically, during a period until when the user fully presses theshutter key 11 a, a looping process from Steps S41 to S43 is repeated,and the live view image is continuously displayed in the display unit 10and the face detection process on the live view image is repeatedlyexecuted during this period.

Subsequently, when the user fully presses the shutter key 11 a, it isdetermined to be YES in Step S43, and the process proceeds to Step S45since it is assumed that the storing of the image that has been capturedbeing instructed. After this step, it is assumed that the image data ofthe frame image processed by the preprocessing unit 4 is stored in theimage storing unit 9.

In Step S44, the image processing unit 7 obtains the image data of theframe image processed by the preprocessing unit 4 from the image storingunit 9. Here, as it takes time to process if a pixel size is large, itis possible to create the reduced scale image data by reducing the scaleof the image data stored in the image storing unit 9, and to carry outthe following process on this reduced scale image data.

In Step S45, the image processing unit 7 carries out the face detectionprocess on the image data of the frame image obtained in the process ofStep S44, thereby attempting to detect the face area in the frame image.Since the face detection process is a known technique, it will not bedescribed in detail.

In Step S46, the image processing unit 7 determines whether or not theface area is detected in the frame image.

If the face area is not detected in the frame image, it is determined tobe NO in Step S46, and the process proceeds to Step S54.

In Step S54, the image processing unit 7 stores (overwrites) the imagedata that has been captured in the image storing unit 9 in an unalteredstate. With this, the process of this flowchart ends.

In contrast, if the face area is detected in the frame image, it isdetermined to be YES in Step S46, and the process proceeds to Step S47.

In Step S47, the image processing unit 7 obtains the face informationbased on the result of the face detection process in Step S45.

Specifically, for example, information such as the coordinates of theframe enclosing the face area and the eye position information of thephotographic subject included in the face area are obtained as the faceinformation.

In Step S48, the image processing unit 7 computes the skin parametersand the like based on the face information obtained in the process ofStep S47.

More specifically, for example, the image processing unit 7 calculates,based on the eye position information, in the same manner as in theprocess of Step S25 in FIG. 7 according to the second embodiment, thearea from which the skin information of the person who is thephotographic subject can be accurately obtained out of the face area, asthe flesh color obtaining area.

The image processing unit 7 carries out color space conversion of theimage data of the flesh color obtaining area from the RGB color space tothe HSV color space.

Then, the image processing unit 7 computes sets of information (a) to(e) listed below as the skin parameters and the like from the image dataof the flesh color obtaining area in the HSV color space:

(a) first parameter;

(b) second parameter;

(c) ratio of the shiny area in the flesh color obtaining area;

(d) degree of reliability of the second parameter; and

(e) ratio of an area of the person's face image in relation to an areaof entire image.

Since the sets of information (a) to (c) are computed in the same manneras in the process of Step S25 in FIG. 7 according to the secondembodiment, a description thereof is not described here. Therefore, onlythe sets of information (d) and (e) not computed in the process of StepS25 in FIG. 7 according to the second embodiment are briefly describedbelow.

Specifically, after calculating the second parameter, the imageprocessing unit 7 calculates a degree of reliability of the secondparameter in a percentage display. Although the method of calculationhere is not particularly limited, a method of comparing average HSVvalues of the colors that are generally recognized as the flesh colorwith the HSV values of the second parameter of the person who isincluded as the photographic subject, for example, can be employed.

Furthermore, the image processing unit 7 computes, for example, aspatial ratio (in the percentage display) of the face area in the frameimage (entire image) as the area of the person's face in relation to theentire image.

Moreover, in the third embodiment, the image processing unit 7 executesthe following process as a part of the process of Step S48.

Specifically, in the immediately previous process of Step S47, thecoordinates of the frame enclosing the face area are obtained as one offace information.

Therefore, the image processing unit 7 calculates an area excluding theframe enclosing the face area out of the frame image as a backgroundarea, based on the coordinates of the frame enclosing the face area.

The image processing unit 7 carries out color space conversion of imagedata of the background area from the RGB color space to the HSV colorspace.

Then, the image processing unit 7 computes sets of information (f) and(g) listed below as the skin parameters and the like from the image dataof the background area in the HSV color space.

It should be noted that, in the sets of information (f) and (g) listedbelow, “background” refers to an image included in the background area.Furthermore, “(HSV)” represents that the information is constituted bythe values of the hue H, the saturation S, and the brightness V;

(f) average parameters (HSV) of the shiny area of the background area(hereinafter abbreviated as the “third parameter”); and

(g) ratio of a background shine to the flesh color of the background(hereinafter abbreviated as the “percentage (%) of the backgroundshine”).

Specifically, the image processing unit 7 distinguishes between theshiny area (a part having the same HSV property as the shine) and theflesh color area other than the shiny area in the background area. Then,the image processing unit 7 calculates the average values of the hue H,the saturation S, and the brightness V of the pixels that constitute theshiny area as the third parameter. Furthermore, the image processingunit 7 calculates a ratio (%) of the shiny area in the background area.

In Step S49, the image processing unit 7 selects one of a method ofexecuting the “first process” (see Steps S5 to S10 in FIG. 4) and amethod of executing the “second process” (see Steps S26 to S31 in FIG.7), as a correcting process for suppressing the shine, based on the skinparameters and the like thus obtained in the process of Step S48.

Such a process of Step S49 is hereinafter referred to as “shinesuppression method selecting process”. The details of the shinesuppression method selecting process will be described later withreference to FIG. 11.

In Step S50, the image processing unit 7 determines whether or not themethod selected in the shine suppression method selecting process ofStep S49 is the method of executing the second process. Morespecifically, the image processing unit 7 determines whether or not aperson's skin color is to be considered. In a case in which it isdetermined that the person's skin color is to be considered, the methodof executing the “second process” is selected, and in a case of notbeing so, the method of executing the “first process” is selected.

If the method of executing the “first process” has been selected in theshine suppression method selecting process of Step S49, it is determinedto be NO in Step S50, and the process proceeds to Step S51.

In Step S51, the image processing unit 7 executes the “first process”(see Steps S5 to S10 in FIG. 4).

In contrast, if the method of executing the “second process” has beenselected in the shine suppression method selecting process of Step S49,it is determined to be YES in Step S50, and the process proceeds to StepS52.

In Step S52, the image processing unit 7 executes the “second process”(see Steps S26 to S31 in FIG. 7).

In this manner, when either the “first process” of Step S51 or the“second process” of Step S52 is carried out on the image data obtainedin the process of Step S44, the process proceeds to Step S53.

In Step S53, the image processing unit 7 stores the image data that hasbeen processed in either Step S51 or S52 in the image storing unit 9.With this, the process of this flowchart ends.

Next, the detailed steps of the shine suppression method selectingprocess of Step S49 in FIG. 10 is described with reference to theflowchart shown in FIG. 11.

In Step S61, the image processing unit 7 determines the reliability ofthe number of faces detected in the face detection process of Step S45in FIG. 10 (hereinafter simply referred to as the “reliability”).

Although the method of determining the reliability is not particularlylimited, the following method is employed in the present embodiment, forexample.

Specifically, if the image data of the frame image obtained in theprocess of Step S44 in FIG. 10 is image data that has been capturedalong with the flash lighting of the light emitting unit 12, it isdetermined that the reliability is “1”.

Furthermore, if the image data of the frame image obtained in theprocess of Step S44 is the image data that has been captured without theflash lighting of the light emitting unit 12, and if the number of facesthat have been detected from the frame image in the face detectionprocess of Step S45 and the number of faces that have been detected fromthe live view image in the face detection process of Step S42 areidentical, it is determined that the reliability is “1”.

On the other hand, if the image data of the frame image obtained in theprocess of Step S44 is image data that has been captured without theflash lighting of the light emitting unit 12, and if the number of facesthat have been detected from the frame image in the face detectionprocess of Step S45 and the number of faces that have been detected fromthe live view image in the face detection process of Step S42 are notidentical, it is determined that the reliability is “0”.

In Step S62, the image processing unit 7 sets a border value of thesaturation S that weakens the effect of the shine suppressing process(hereinafter accordingly referred to as the “border value S”).

In other words, in the third embodiment as well as in the firstembodiment and the second embodiment, the border value S is previouslyset in the shine suppressing process. Such a value S is hereinafterreferred to as the “initial border value”. For example, a value of thesaturation S at the border between a white area such as fluorescentlighting and the remaining area is generally set as the initial bordervalue. Specifically, in the shine suppressing process using the initialborder value, the degree of the effect of the shine suppressing processis reduced only in the white area such as fluorescent lighting.

However, a value of the saturation S of the first parameter in the fleshcolor obtaining area (hereinafter referred to as the “skin shine averageS value”) exceeds a value of the third parameter of the saturation S(hereinafter referred to as the “background shine average S value”).

In this manner, in the state in which the skin shine average S valueexceeds the background shine average S value, the shine suppressingprocess can be carried out only to the shiny area among the flesh colorobtaining area.

Accordingly, in such a state, the image processing unit 7 sets a valuebetween the skin shine average S value and the background shine averageS value 112 as the border value S. With this, it is possible to reducethe degree of the effect of the shine suppressing process on thebackground area as well.

In Step S63, the image processing unit 7 determines whether or not thereliability determined in the process of Step S61 is “1”.

If the reliability is “0”, it is determined to be NO in Step S63, andthe process proceeds to Step S69. In Step S69, the image processing unit7 selects the method of executing the “first process” (see Steps S5 toS10 in FIG. 4) as the shine suppression method.

In contrast, if the reliability is “1”, it is determined to be YES inStep S63 as not being appropriate to select the shine suppression methodat this stage, and the process proceeds to Step S64.

In Step S64, the image processing unit 7 determines whether or not thereis only one photographic subject.

If more than one person's face is detected in the image data of theframe image obtained in the process of Step S44 in FIG. 10 as a resultof carrying out the face detection process of Step S45, i.e., if thereis more than one photographic subject, it is determined to be NO in StepS64, and the process proceeds to Step S69. In Step S69, the imageprocessing unit 7 selects the method of executing the “first process” asthe shine suppression method.

In contrast, if a single person's face is detected in the image data ofthe frame image obtained the process of Step S44 in FIG. 10 as a resultof carrying out the face detection process of Step S45, i.e., if thereis one photographic subject, it is determined to be YES in Step S64 asnot being appropriate to select the shine suppression method at thisstage, and the process proceeds to Step S65.

It should be noted that the “second process” in the third embodiment isprovided with the process of Step S64, since it is presupposed that theflesh color of a single person who is the photographic subject is takeninto account. Therefore, in a case in which the “second process” thatcan take flesh colors of individual persons of more than onephotographic subject into account is employed, the process of Step S64can be omitted.

In Step S65, the image processing unit 7 determines whether or not thedegree of reliability of the second parameter (the sets of information(d) obtained in the process of Step S48 in FIG. 10) is no greater than apredetermined level.

If the degree of reliability of the second parameter is no greater thanthe predetermined level, it is determined to be YES in Step S65, and theprocess proceeds to Step S69. In Step S69, the image processing unit 7selects the method of executing the “first process” as the shinesuppression method.

In contrast, if the degree of reliability of the second parameter isgreater than the predetermined level, it is determined to be NO in StepS65 as not being appropriate to select the shine suppression method atthis stage, and the process proceeds to Step S66.

In Step S66, the image processing unit 7 determines whether or not theratio of the area of the person's face in relation to the area of theentire image (the sets of information (e) obtained in the process ofStep S48 in FIG. 10) is no less than a predetermined level.

If the area of the person's face is no less than the predeterminedlevel, it is determined to be YES in Step S66, and the process proceedsto Step S70. In Step S70, the image processing unit 7 selects the methodof executing the “second process” (see Steps S26 to S31 in FIG. 7) asthe shine suppression method.

In contrast, if the area of the person's face is smaller than thepredetermined level, it is determined to be NO in Step S66 as not beingappropriate to select the shine suppression method at this stage, andthe process proceeds to Step S67.

In Step S67, the image processing unit 7 determines whether or not thevalue of the saturation S of the second parameter (the sets ofinformation (b) obtained in the process of Step S48 in FIG. 10, andhereinafter referred to as “S value of the second parameter”) is withina predetermined range.

If the S value of the second parameter is within the predeterminedrange, it is determined to be YES in Step S67, and the process proceedsto Step S70. In Step S70, the image processing unit 7 selects the methodof executing the “second process” as the shine suppression method.

In contrast, if the S value of the second parameter does not fall withinthe predetermined range, it is determined to be NO in Step S67 as notbeing appropriate to select the shine suppression method at this stage,and the process proceeds to Step S68.

In Step S68, the image processing unit 7 determines whether or not theratio of the shiny area in the background area (the set of information(g) obtained in the process of Step S48 in FIG. 10) is no greater than apredetermined level.

If the percentage (%) of the background shine is no greater than thepredetermined level, it is determined to be YES in Step S68, and theprocess proceeds to Step S70. In Step S70, the image processing unit 7selects the method of executing the “second process” as the shinesuppression method.

In contrast, if the percentage (%) of the background shine is greaterthan the predetermined level, it is determined to be NO in Step S68, andthe process proceeds to Step S69. In Step S69, the image processing unit7 selects the method of executing the “first process” as the shinesuppression method.

As described above, when the shine suppression method is selected in theprocess of Steps S69 or S70, the shine suppression method selectingprocess ends.

Specifically, the process of Step S49 in FIG. 10 ends, and the processproceeds to Step S50.

If the method of executing the “first process” has been selected in theprocess of Step S69 in FIG. 11, it is determined to be NO in Step S50,and the “first process” is executed in the process of Step S51.

In contrast, if the method of executing the “second process” has beenselected in the process of Step S70 in FIG. 11, it is determined to beYES in Step S50, and the “second process” is executed in the process ofStep S52.

The digital camera 1 of the third embodiment provides the followingeffect (9) in addition to the effects (1) to (5) similarly to the firstembodiment and the effects (6) to (8) similarly to the secondembodiment.

(9) By executing the “second process” (see Steps S26 to S31 in FIG. 7)according to the second embodiment, the effect (6) described above canbe provided. Specifically, the “first process” (see Steps S5 to S10 inFIG. 4) according to the first embodiment poses a problem in that thecolor is tinged with red. The effect (6) described above solves thisproblem.

However, there is often a case in which executing the “second process”not only fails to address to this problem, but leads to an undesirableprocess result, such as the case in which the information relating tothe skin of the person who is the photographic subject is notappropriately obtained. Alternatively, it is probable that the “secondprocess” cannot be executed at all as the necessary information is notprovided.

According to the third embodiment, it is possible to execute the “firstprocess” in place of the “second process” even in such a case, and thusthe effect of the shine suppression above a certain level can berealized.

Although the first embodiment, the second embodiment, and the thirdembodiment according to the present invention have been described, thepresent invention is not limited to the above described embodiments.Specifically, it should be appreciated that variations and improvementswithin a scope that can achieve the object of the present invention asdescribed below are included in the present invention.

(1) When the person capturing mode is set, the control unit 8 may carryout the shine suppressing process for reducing the shine component inthe image data that has been captured. In the person capturing mode, itis highly probable that the flash lighting automatically emits lightwhile the person's face is captured. Thus, the shine component is likelyproduced in the person's face that has been captured. Accordingly, whenthe person capturing mode is set, the shine suppressing process forreducing the shine component can be carried out on the image data thathas been captured regardless of the use of the flash light emission.With this, it is possible to obtain a more favorable image in which theshine component is reduced.

(2) It is also possible to extract a portion corresponding to theperson's forehead, cheek, or nose, where the occurrence of the shinecomponent is easily, in the face area that has been detected in the facedetection process, and to specify the process area from these portions.With this, the portion where the shine component can be easily producedis extracted, and thus it is possible to more accurately specify theprocess area.

(3) The flesh color area and the process area can be specified by theuser, while looking at an image displayed in the display unit 10, usingan operation input member that is not shown in the drawing. In thiscase, it is possible for the user to visually determine the distributionof the hue H in the flesh color area by displaying the schematic diagramof the HSV color space shown in FIG. 2 in color on the display unit 10.

(4) All or a part of the functions of the image processing unit 7 asdescribed above can be realized by the control unit 8 operatingaccording to the image processing programs relating to the presentinvention.

(5) According to the embodiment described above, the example in whichthe photographing lens 2 and the image capturing unit 3 serve as theimage obtaining means in the present invention. However, it is possibleto employ a configuration such that an image that has been capturedusing another digital camera or the like is imported into the digitalcamera 1. In this case, a card slot unit to which a storing medium inwhich the image data is stored is detachably loaded or a connectingterminal to a cable or a transmitter for importing the image datathrough a wire or wirelessly serves as the image obtaining means.

(6) Furthermore, according to the embodiment described above, theprocess area is detected from the flesh color area. However, the processarea can be detected from a different color area. In this case, a rangeof a desired value of the hue H is first specified, and an area ofpixels within the range of the specified value of the hue H and having asaturation S that is no greater than the predetermined value and abrightness V that is no smaller than the predetermined value isspecified as the process area.

(7) In the second embodiment, the image processing unit 7 sets thetarget value based on the first parameter and the second parameter ofthe flesh color obtaining area. However, the target value can be settaking only the second parameter into account.

(8) Moreover, the present invention is not particularly limited to theHSV space, and can be widely applied to various hue spaces such as a YUVspace or an RGB space.

(9) The present invention is not limited to digital cameras, and can beapplied to electronic devices in general having a function for capturingstill images, for example, such as a mobile phone provided with acamera. Furthermore, the present invention can be applied to any imageprocessing apparatus having a function of color image processing. Theimage processing apparatus according to the present invention alsoinclude a computer apparatus capable of realizing functions of the imageprocessing unit 7 according to any embodiments by operating according toa predetermined program.

What is claimed is:
 1. An image processing apparatus comprising: a CPU;an image obtaining unit that obtains an image; a color area detectingunit that detects a predetermined color area from the image; an areaspecifying unit that specifies an area to be adjusted based on asaturation and a brightness of the color area; a color adjusting unitthat adjusts at least one of a hue, the saturation, and the brightnessof the area to be adjusted; and a face detecting unit that detects aface area of a person from the image; wherein: the color area detectingunit detects a predetermined color area from an image of the face area;the color adjusting unit includes a flesh color information obtainingunit that obtains flesh color information relating to a flesh color ofthe person based on the image of the face area; the flesh colorinformation obtaining unit obtains first average value information andsecond average value information as the flesh color information, thefirst average value information containing average values of the hue,the saturation, and the brightness, respectively, of pixels in the areato be adjusted, and the second average value information containingaverage values of the hue, the saturation, and the brightness,respectively, of pixels in a flesh color obtaining area from which theflesh color information is to be obtained out of the image of the facearea; the color adjusting unit adjusts at least one of the hue, thesaturation, and the brightness of the pixels in the area to be adjustedbased on a difference between the first average value information andthe second average value information obtained by the flesh colorinformation obtaining unit; and functions of the image obtaining unit,the color area detecting unit, the area specifying unit, the coloradjusting unit, and the face detecting unit are performed under controlof the CPU.
 2. The image processing apparatus as set forth in claim 1,wherein the color adjusting unit obtains the difference between thefirst average value information and the second average value informationfor each of the hue, the saturation, and the brightness, and obtains atleast one of the hue, the saturation, and the brightness of the pixelsin the area to be adjusted based on the difference.
 3. An imageprocessing apparatus, comprising: a CPU; an image obtaining unit thatobtains an image; a face detecting unit that detects a face area of aperson from the image obtained by the image obtaining unit; a color areadetecting unit that obtains a hue from an image of the face area, anddetects a predetermined color area based on the hue; an area specifyingunit that specifies an area to be adjusted from the predetermined colorarea, based on a saturation and a brightness of the predetermined colorarea; and a color adjusting unit that adjusts at least one of the hue,the saturation, and the brightness of a pixel in the area to beadjusted; wherein: the color adjusting unit includes a flesh colorinformation obtaining unit that obtains flesh color information relatingto a flesh color of a person included in the image, and adjusts each ofthe hue, the saturation, and the brightness of the pixel in the area tobe adjusted based on the flesh color information obtained by the fleshcolor information obtaining unit, the flesh color information obtainingunit includes: a position information obtaining unit that obtainsposition information indicating a position of a specific portion of theperson included in the face area; and a setting unit that sets an areafrom which the flesh color information of the person is to be obtainedout of the face area as a flesh color obtaining area based on theposition information; the flesh color information obtaining unit obtainsthe flesh color information based on an image of the flesh colorobtaining area, the flesh color information obtaining unit obtains firstaverage value information and second average value information as theflesh color information, the first average value information containingaverage values of the hue, the saturation, and the brightness,respectively, of pixels in the area to be adjusted, and the secondaverage value information containing average values of the hue, thesaturation, and the brightness, respectively, of pixels in the fleshcolor obtaining area, the color adjusting unit adjusts at least one ofthe hue, the saturation, and the brightness of the pixels in the area tobe adjusted based on a difference between the first average valueinformation and the second average value information obtained by theflesh color information obtaining unit; and functions of the imageobtaining unit, the color area detecting unit, the area specifying unit,the color adjusting unit, and the face detecting unit are performedunder control of the CPU.
 4. The image processing apparatus as set forthin claim 3, wherein the color adjusting unit obtains the differencebetween the first average value information and the second average valueinformation for each of the hue, the saturation, and the brightness, andobtains at least one of the hue, the saturation, and the brightness ofthe pixels in the area to be adjusted based on the difference.
 5. Animage processing apparatus, comprising: a CPU; an image obtaining unitthat obtains an image; a face detecting unit that detects a face area ofa person from the image obtained by the image obtaining unit; a colorarea detecting unit that obtains a hue from an image of the face area,and detects a predetermined color area based on the hue; an areaspecifying unit that specifies an area to be adjusted from thepredetermined color area, based on a saturation and a brightness of thepredetermined color area; and a color adjusting unit that adjusts atleast one of the hue, the saturation, and the brightness of a pixel inthe area to be adjusted; wherein: the color adjusting unit includes aflesh color information obtaining unit that obtains flesh colorinformation relating to a flesh color of a person included in the image,and adjusts each of the hue, the saturation, and the brightness of thepixel in the area to be adjusted based on the flesh color informationobtained by the flesh color information obtaining unit; the flesh colorinformation obtaining unit obtains first average value information andsecond average value information as the flesh color information, thefirst average value information containing average values of the hue,the saturation, and the brightness, respectively, of pixels in the areato be adjusted, and the second average value information containingaverage values of the hue, the saturation, and the brightness,respectively, of pixels in a flesh color obtaining area from which theflesh color information is to be obtained out of the image of the facearea; the color adjusting unit adjusts at least one of the hue, thesaturation, and the brightness of the pixels in the area to be adjustedbased on a difference between the first average value information andthe second average value information obtained by the flesh colorinformation obtaining unit; and functions of the image obtaining unit,the color area detecting unit, the area specifying unit, the coloradjusting unit, and the face detecting unit are performed under controlof the CPU.
 6. An image processing apparatus as set forth in claim 5,wherein the color adjusting unit obtains the difference between thefirst average value information and the second average value informationfor each of the hue, the saturation, and the brightness, and obtains atleast one of the hue, the saturation, and the brightness of the pixelsof the area to be adjusted based on the difference.
 7. An imageprocessing method comprising: obtaining an image; detecting a face areaof a person from the image, and detecting a predetermined color areafrom an image of the face area; specifying an area to be adjusted basedon a saturation and a brightness of the color area; obtaining fleshcolor information relating to a flesh color of the person based on theimage of the face area; and adjusting at least one of a hue, thesaturation, and the brightness of the area to be adjusted; wherein theobtaining comprises obtaining first average value information and secondaverage value information as the flesh color information, the firstaverage value information containing average values of the hue, thesaturation, and the brightness, respectively, of pixels in the area tobe adjusted, and the second average value information containing averagevalues of the hue, the saturation, and the brightness, respectively, ofpixels in a flesh color obtaining area from which the flesh colorinformation is to be obtained out of the image of the face area; and theadjusting comprises adjusting at least one of the hue, the saturation,and the brightness of the pixels in the area to be adjusted based on adifference between the obtained first average value information and theobtained second average value information.
 8. A non-transitory computerreadable storage medium having an image processing program storedthereon which controls a computer provided with an image obtaining unitthat obtains an image, the program controlling the computer to performfunctions comprising: detecting a face area of a person from the image,and detecting a predetermined color area from an image of the face area;specifying an area to be adjusted based on a saturation and a brightnessof the color area; obtaining flesh color information relating to a fleshcolor of the person based on the image of the face area; and adjustingat least one of a hue, the saturation, and the brightness of the area tobe adjusted; wherein: the obtaining comprises obtaining first averagevalue information and second average value information as the fleshcolor information, the first average value information containingaverage values of the hue, the saturation, and the brightness,respectively, of pixels in the area to be adjusted, and the secondaverage value information containing average values of the hue, thesaturation, and the brightness, respectively, of pixels in a flesh colorobtaining area from which the flesh color information is to be obtainedout of the image of the face area; and the adjusting comprises adjustingat least one of the hue, the saturation, and the brightness of thepixels in the area to be adjusted based on a difference between theobtained first average value information and the obtained second averagevalue.